<?php

namespace common\logics;

use common\helpers\Url;

/**
 * This is the model class for table "{{%user}}".
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class UserCellLogic extends \common\models\BaseUser {

    public function fields() {
        return [
            'id',
            'nickname',
            'avatar' => function() {
                return Url::attach($this->avatar);
            },
            'gender' => function() {
                return $this->meta ? $this->meta->gender : 0;
            },
        ];
    }

}
